package com.xiexie.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xiexie.seckill.pojo.User;
import com.xiexie.seckill.vo.LoginVo;
import com.xiexie.seckill.vo.RespBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *  服务类
 *
 * @author xiexie
 * @date 2021-07-30
 */
public interface IUserService extends IService<User> {

    /**
     * 登录
     * @param loginVo
     * @param request
     * @param response
     * @return
     */
    RespBean doLogin(LoginVo loginVo, HttpServletRequest request, HttpServletResponse response);

    /**
     * 根据cookie 获取用户
     * @param ticket
     * @return
     */
    User getUserByCookie(String ticket, HttpServletRequest request, HttpServletResponse responses);

    /**
     * 更新用户密码
     * @param tikect
     * @param password
     * @return
     */
    RespBean updatePassword(String tikect, String password, HttpServletRequest request, HttpServletResponse response);

}
